/*
 * Copyright (C) 2011 JiangHongTiao <jjurco.sk_gmail.com>
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
package sk.lieskove.jianghongtiao.websearch;

import sk.lieskove.jianghongtiao.common.enums.searchserviceenum.SearchServiceEnum;
import sk.lieskove.jianghongtiao.websearch.service.SearchQuery;
import sk.lieskove.jianghongtiao.websearch.persistence.WebSearchResponse;

import java.util.List;

/**
 * Date of create: Oct 12, 2011
 *
 * @author JiangHongTiao <jjurco.sk_gmail.com>
 * @version 2011.1012
 */
public interface WebSearch {
    
    /**
     * Search in all services specified in the list of services with query and maximal number of results.
     * 
     * @param query search query
     * @param numberOfResults maximal number of results from one service
     * @param services list of service where to search
     * @return list of found files preprocessed with basic operations
     */
    public List<WebSearchResponse> search(SearchQuery query, int numberOfResults,
            SearchServiceEnum... services);
    
    /**
     * Search in all services specified in the list of services with query.
     * Maximal number of results is specified in the settings file
     * 
     * @param query search query
     * @param services list of service where to search
     * @return list of found files preprocessed with basic operations
     */
    public List<WebSearchResponse> search(SearchQuery query, SearchServiceEnum ... services);
    
    /**
     * Search over all services with query and maximal number of results.
     * 
     * @param query search query
     * @param numberOfResults maximal number of results from one service
     * @return list of found files preprocessed with basic operations
     */
    public List<WebSearchResponse> searchAll(SearchQuery query, int numberOfResults);
    
    /**
     * Search over all services specified in the list of services with query.
     * Maximal number of results is specified in the settings file
     * 
     * @param query search query
     * @return list of found files preprocessed with basic operations
     */
    public List<WebSearchResponse> searchAll(SearchQuery query);
    
}
